#!/bin/sh

# Use tmpfs to collect data, since root is still readonly
mount -n -t tmpfs -o size=50M none /bootlimnoutput

# run as long until exit condition satisfied
# Start systemtap daemons & probe
/usr/bin/staprun /bootlimnko/processinfo.ko -c 'sleep 100' -o /bootlimnoutput/processlog.xml &
/usr/bin/staprun /bootlimnko/readwriteinfo.ko -c 'sleep 100' -o /bootlimnoutput/readwritelog.xml &
/usr/bin/staprun /bootlimnko/blockioinfo.ko -c 'sleep 100' -o /bootlimnoutput/blockiolog.xml &
/usr/bin/staprun /bootlimnko/statsinfo.ko -c 'sleep 100' -o /bootlimnoutput/statslog.xml &
/usr/bin/staprun /bootlimnko/perproinfo.ko -c 'sleep 100' -o /bootlimnoutput/perprolog.xml &

# Give daemon time to start collecting...
sleep 3

# Hand off to real init
exec /sbin/init
